﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using SystemCenterSoa.ApiProject.Area.SystemManager;
using SystemCenterSoa.DtoModel.Common;
using SystemCenterSoa.PoModel.SystemSettings.CommonlyUsedSettings;
using SystemCenterSoa.Service.SystemSettings.CommonlyUsedSettings;

namespace SystemCenterSoa.ApiProject.Area.SystemSettings.CommonlyUsedSettings
{
    [AllowAnonymous]  //不验证登录
    public class IntroductionPersonnelSalaryController : SystemManagerBaseController
    {
        private IntroductionPersonnelSalaryService _introductionPersonnelSalaryService;

        public IntroductionPersonnelSalaryController(IntroductionPersonnelSalaryService introductionPersonnelSalaryService)
        {
            _introductionPersonnelSalaryService = introductionPersonnelSalaryService;
        }


        [HttpPost]
        public ResultModel<int> IntroductionPersonnelSalaryAdd(IntroductionPersonnelSalaryPo form)
        {
            var data=_introductionPersonnelSalaryService.IntroductionPersonnelSalaryAdd(form);
            return MyOk(data);
        }

        [HttpGet]
        public ResultModel<List<IntroductionPersonnelSalaryPo>> SearchPage(string depname, int year, int month)
        {
            var data=_introductionPersonnelSalaryService.SearchPage(depname, year, month);
            return MyOk(data);
        }

        [HttpGet]
        public ResultModel<object> GetDropDown()
        {
            var data = _introductionPersonnelSalaryService.GetDropDown();
            return MyOk(data);
        }



    }
}
